//const plugin = requirePlugin('choose-school')
Page({
  data: {
    items: [],
    currentItem: 0,
    school:{}
  },
  onLoad(options) {
    console.log('onload:',options)
    //plugin.sayHello()
    //const world = plugin.answer
    //console.log(world)

  },
  onShow(options){
    console.log('onshow:',options)
  },
  naviPlugin(){
    var that = this
    wx.navigateTo({
      url: 'plugin://choose-school/chooseSchool',
      events: {
        // 监听返回数据
        acceptDataFromOpenedPage: function(res) {
          console.log('回调成功：',res)
          that.setData({
            school:res.data
          })
        },
      },
    })
  },
  addItem() {
    this.data.items.push(this.data.currentItem++)
    this.setData({
      items: this.data.items,
      currentItem: this.data.currentItem
    })
  }
})
